The present application claims priority to Chinese Patent Application Number 2006-10156279.8, filed Dec. 29, 2006, the entirety of which is hereby incorporated by reference.
In various applications of Intelligent Transport Systems (ITS), when a vehicle image is recognized based on machine vision, the external environment around the moving vehicle varies constantly and significantly. It is difficult to only use one particular feature or method to recognize a vehicle image under these different environments. Therefore, it is necessary to recognize a current traveling environment and to provide one of multiple different algorithms that is suitable for the current environment.
The existing vehicle image recognizing method based on a vehicle body contour and vehicle body hierarchy has a good recognizing result in the case of relatively better lighting in daytime. However, under a dark condition in nighttime, the darkness and the vehicle headlights will always destroy the above vehicle information which the vehicle image recognizing method depends on, so that it is difficult for the vehicle image recognizing method based on a vehicle body contour and vehicle body hierarchy to correctly partition and recognize a vehicle under a nighttime dark condition. Conventionally, it is required to determine whether the current image is a daytime image or a nighttime image according to the lightness of a particular portion in the image, so as to choose a vehicle image recognizing method suitable for the current environment.
The following solutions for recognizing daytime and nighttime images have been disclosed in the prior art.
The first existing daytime and nighttime image recognizing method is based on the fact that the upper part of an image is mostly characterized by an air region, and performs image recognition by calculating the average lightness value of the upper part in the image. As shown in FIG. 1, at step S1, a road condition image picked up by a camera on an object vehicle is input; at step S2, an average lightness value of the upper part (i.e., the air region) in the image input at step S1 is calculated. At step S3, the calculated average lightness value is compared with a predefined reference value, and the images whose lightness is lower than the predefined reference value are determined to be nighttime images, whereas the images whose lightness is higher than the predefined reference value are determined to be daytime images. Finally, at step S4, the result determined at step S3, i.e., the daytime and nighttime image recognizing result, is provided as an output.
However, the situations shown in FIGS. 2 to 5 will interfere with the daytime and nighttime image recognizing method that is based on the average lightness value of the upper part in the image. If an algorithm that is not suitable for the current environment is used due to an incorrect determination caused by these situations, the vehicle image is unable to be recognized or the vehicle image is incorrectly recognized.
The second daytime and nighttime image recognizing method, disclosed by Japanese Patent Laid-Open Publication No 9-35197, considers the problem that the above situations will interfere with the average lightness value of the air region in the image and thus make an incorrect determination. The second method is shown in FIG. 6. At step S21, a road condition image picked up by a camera on an object vehicle is entered. At step 22, the lane lines of the lane in which the object vehicle is traveling are detected in the image. At step S23, an intersection point of the detected lane lines is taken as a vanishing point of the image, and the region above the vanishing point is divided into 16 small regions. At step S24, the average lightness value of each small region is calculated respectively. At step S25, the average lightness value of each small region is compared with a predefined reference value, and all of the small regions whose average lightness values are lower than the predefined reference value are judged to be night regions. When more than ¾ of the small regions are judged to be nighttime regions, it is determined that the image is in a nighttime lighting condition; otherwise, the image is judged to be in a daytime lighting condition. Finally, at step S26, a daytime and nighttime image recognizing result is provided as an output based on the recognizing result determined at step S25.
However, in the second method, it is necessary to find the lane lines of the lane in which the object vehicle is traveling and obtain the distribution of the lightness value of the air region in the image based on the lane lines. Thus, in the case that there is no lane line on a road or the image includes no lane line, the method cannot determine the air region for calculating the distribution of the lightness value. Accordingly, the method is unable to proceed to the subsequent steps, so that no daytime and nighttime image recognition will be achieved.
Additionally, as shown in FIG. 7, under a natural condition, the regions above a vanishing point in the image will still be affected by the buildings and mountains in the background. In the daytime, when the background is entirely obstructed by remote buildings or mountains, the lightness around the object vehicle is still under a daytime lighting condition, because it actually is not affected by the remote background. Meanwhile, if the second method divides the region above the vanishing point into 16 small regions, more than ¾ of the small regions still will be determined to be nighttime regions. This will certainly cause an incorrect determination so that an algorithm unsuitable to the current environment will be used, and a case that a vehicle image is unable to be recognized or is incorrectly recognized will occur.
Because of the complexity of the environment through which the vehicle travels, it is difficult to guarantee in some special cases that each image will be recognized correctly. For the above known methods, if an incorrect recognition occurs in one image, it is difficult to recognize and partition a vehicle image from the incorrectly recognized image, and the error is introduced in subsequent processing such as vehicle image tracking.